package com.itheima.dao;

import com.itheima.domain.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserDao {
    /**
     * 添加用户
     * @param user
     * @return
     */
    public boolean save(User user);

    /**
     * 更新用户
     * @param user
     * @return
     */
    public boolean update(User user);

    /**
     * 删除用户
     * @param uuid
     * @return
     */
    public boolean delete(Integer uuid);

    /**
     * 查询单个用户
     * @param uuid
     * @return
     */
    public User getById(Integer uuid);

    /**
     * 查询所有用户
     * @return
     */
    public List<User> getAll();

    /**
     * 根据用户名和密码登录用户
     * @param userName
     * @param password
     * @return
     */
    public User getByUserNameAndPassword(@Param("userName") String userName,@Param("password") String password);
}
